/*
 * @Author: byron
 * @Date: 2021-12-22 22:54:23
 * @LastEditTime: 2022-02-17 22:57:21
 */

import {
    request
} from '../http'

// 获取权限树
export const getPermissionTree = (param) =>
    request.get('/permission/permissionTree', param)

export const getPermission = (param) =>
    request.post('/permission/permissionList', param)

// 为角色分配权限
export const allotPermission = (data) =>
    request.post('/role/allotPermission', data)

// 查找角色权限
export const permissionDetail = (id) =>
    request.get(`/permission/permissionDetail/${id}`)

// 刷新当前用户权限
export const refreshPermission = () =>
    request.get(`/permission/refreshPermission`)